(function () {
    var cn = document.getElementById('confnode');
    var dt = new Date();
    var version = dt.getFullYear() + '.'+ (dt.getMonth() + 1) + '.'+ dt.getDate();
    // seajs的配置
    seajs.config({
        alias: {
            '$': 'jquery/jquery-2.1.0.min',
            'layer': 'layermobile/layer',
            'fclick': 'fastclick/fastclick.min',
            'laydate': 'laydate/laydate',
            'dfalert': 'defaultalert/default_alert',
            'mobiscroll': 'mobiscroll/mobiscroll.custom-3.0.0-beta2.min.js',
            'upload': 'bower_components/upload/jquery.ui.widget.js',
            'fileupload': 'bower_components/upload/jquery.fileupload.js',
            'cookie':'jquery-cookie/jquery.cookie.js',
            'quicksort':'quicksort.js',
            'swiper':'swiper/swiper.min.js',
            'masonry':'masonry/masonry.pkgd.min.js',
            'imgload':'masonry/imagesloaded.pkgd.min.js',
            'highcharts':'highcharts/highcharts.js',
            'highcharts_more':'highcharts/highcharts-more.js',
            'gauge':'highcharts/modules/solid-gauge.js'
        },
        paths: {
            'publicjs': '/assets/public',
            'wapjs': '/assets'
        },
        map: [//自动给js后面加上版本号  线上更新时修改版本号,清除之前的js缓存
            ['.js', '.js?v=' + version]
        ],
        debug: false //调试模式开关
    });
    // 加载入口模块
    if (cn) {
        var enter = cn.getAttribute('enter');
        enter && seajs.use(enter, function (e) {
            e && e.ready && e.ready();
        });
    }
})();